﻿@{
    <link href="~/css/table.css" rel="stylesheet" />
    <script src="~/javascript/calendar/cal.js"></script>
    <script src="~/javascript/comm/comm.js"></script>
    <script src="~/javascript/comm/list.js"></script>
    <script src="~/javascript/calendar-ch.js"></script>
    <script src="~/javascript/comm/time.js"></script>
    <script src="~/js/jquery-1.11.1(1).js"></script>
    <script src="~/js/vue.js"></script>
}
<body>
    <div id="app">
        <form name="form" id="form1">
            <table width="100%">
                <tr>
                    <td>
                        <font color="black">您正在做的业务是：人力资源--调动管理--调动登记查询 </font>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        <button type="button" v-on:click="select()" class="BUTTON_STYLE1">查询</button>
                    </td>
                </tr>
            </table>
            <input type="hidden" name="page.startPage" value="0">
            <table width="101%" border="1" cellpadding=0 cellspacing=1
                   bordercolorlight=#848284 bordercolordark=#eeeeee
                   class="TABLE_STYLE1">
                <tr class="TR_STYLE1">
                    
                    <td width="13%" class="TD_STYLE1">
                        请选择员工所在I级机构
                    </td>
                    <td width="29%" class="TD_STYLE2">
                        <input hidden="hidden" id="first_kind_name" name="first_kind_name" />
                        <select name="first_kind_id" id="first_kind_id" class="INPUT_STYLE1" v-on:click="GetoneId()">
                            <option value="0">请选择第I级机构名称</option>
                            <option v-for="(item,index) in onelist" :value="item.first_kind_id">{{item.first_kind_name}}</option>
                        </select>
                    </td>
                    <td width="13%" class="TD_STYLE1">
                        请选择员工所在II级机构
                    </td>
                    <td width="45%" class="TD_STYLE2">
                        <input hidden="hidden" id="second_kind_name" name="second_kind_name" />
                        <select name="second_kind_id" id="second_kind_id" class="INPUT_STYLE1" v-on:click="GettwoId()">
                            <option value="0">请选择第II级机构名称</option>
                            <option v-for="(item,index) in secondlist" :value="item.second_kind_id">{{item.second_kind_name}}</option>
                        </select>
                    </td>
                    <td width="0%"></td>
                </tr>
                <tr class="TR_STYLE1">
                    <td width="13%" class="TD_STYLE1">
                        请选择员工所在III级机构
                    </td>
                    <td width="29%" class="TD_STYLE2">
                        <input hidden="hidden" id="third_kind_name" name="third_kind_name" />
                        <select name="third_kind_id" id="third_kind_id" class="INPUT_STYLE1" v-on:click="GetthreeId()">
                            <option value="0">请选择第III级机构名称</option>
                            <option v-for="(item,index) in thirdlist":value="item.third_kind_id">{{item.third_kind_name}}</option>
                        </select>
                    </td>
                    <td height="18" class="TD_STYLE1">
                        请输入建档时间
                    </td>
                    <td width="45%" class="TD_STYLE2">
                        <input name="utilbean.startDate" onclick="aa('utilbean.startDate')" type="text" class="INPUT_STYLE2" id="start" style="width:24% " value="" size="30">
                        至<input type="text" name="utilbean.endDate" onclick="aa('utilbean.endDate')" value="" style="width:24% " class="INPUT_STYLE2" id="end">
                        （YYYY-MM-DD）
                    </td>
                </tr>
            </table>
        </form>
    </div>
</body>

<script type="text/javascript">
    var vm = new Vue({
        el: "#app",
        data: {  
            onelist: [],
            secondlist: [],
            thirdlist: [],          
        },
        methods: {
            GetoneId: function () {
                var t = this;
                $.ajax({
                    url: "/diaodongguanli/one",
                    type: "Post",                 
                    success: function (msg) {
                        var dts = eval(msg);
                        t.onelist = dts;
                    }
                })
            },
            GettwoId: function () {
                var t = this;
                var first_kind_id = $("#first_kind_id").val();
                $.ajax({
                    url: "/diaodongguanli/two?t=" + first_kind_id,
                    type: "Post",                   
                    success: function (msg) {
                        var dts = eval("(" + msg + ")");
                        t.secondlist = dts;
                    }
                })
            }, GetthreeId: function () {
                var t = this;
                var second_kind_id = $("#second_kind_id").val();
                $.ajax({
                    url: "/diaodongguanli/three?t=" + second_kind_id,
                    type: "Post",                 
                    success: function (msg) {
                        var dts = eval("(" + msg + ")");
                        t.thirdlist = dts;
                    }
                })
            },
            select: function () {
                var first_kind_id = $("#first_kind_id").val();
                var second_kind_id = $("#second_kind_id").val();
                var third_kind_id = $("#third_kind_id").val();
                var start = $("#start").val();
                var end = $("#end").val();
                if (first_kind_id == null || first_kind_id == "" || second_kind_id == null || second_kind_id == "" || third_kind_id == "" || third_kind_id == null || start == null || start == "" || end == null || end == "") {
                    return false;
                } else {
                    location.href = "/diaodongguanli/register_list?first_kind_id=" + first_kind_id + "&second_kind_id=" + second_kind_id + "&third_kind_id=" + third_kind_id + "&start=" + start + "&end=" + end;
                }

            }
        },
        
    })
</script>


